﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Product_Add.aspx.cs" MasterPageFile="/Admin/MasterPage.master"Inherits="Admin_Form_Product_Add" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" ID="content" runat="server">
    <center>
    <telerik:RadWindowManager runat="server" ID="window1">
        <Windows>
             <telerik:RadWindow runat="server" Width="400px" Height="400px" VisibleStatusbar="false"
                NavigateUrl="FileManager.aspx" ID="ExplorerWindow" Modal="true" >
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
</center>        
<fieldset>
    <legend style="color: #0000FF; font-weight: 700; font-size: large; padding:10px 10px 10px">Quản trị Sản Phẩm</legend>    
  <div style="text-align:center; font-size:larger"><asp:Label runat="server" CssClass="AdminMessage" ID="lblMessage"></asp:Label></div>
    
        <input type="hidden" id="txtProductID" runat="server" />
        <table style="text-align:left">
            <tr>
                <td style="width:250px">Nhóm Sản Phẩm</td>
                <td>
                <asp:DropDownList CssClass="AdminList" runat="server" DataTextField="CategoryPageName" DataValueField="CategoryPageID" ID="cboCategoryPage">
                </asp:DropDownList></td>
            </tr>
                    
            <tr>
                <td style="width:250px">Tên Sản Phẩm</td>
                <td><asp:TextBox CssClass="AdminTextbox" runat="server" ID="txtProductName"></asp:TextBox></td>
                <td><asp:RequiredFieldValidator runat="server" ID="require1" ControlToValidate="txtProductName"></asp:RequiredFieldValidator></td>
            </tr>
            
            <tr>
                <td style="width:250px">Mã Sản Phẩm</td>
                <td><asp:TextBox CssClass="AdminTextbox" runat="server" ID="txtUnit"></asp:TextBox></td>
                <td></td>
            </tr>
            
            <tr>
                <td style="width:250px">Tiêu đề trang sản phẩm</td>
                <td>
                    <asp:TextBox CssClass="AdminTextbox" ID="txtProductPageTitle" runat="server"></asp:TextBox>
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ErrorMessage="Bạn Phải nhập tên trang sản phẩm" 
                        ControlToValidate="txtProductPageTitle"></asp:RequiredFieldValidator>
                </td>
            </tr>
            
            <tr>
                <td style="width:250px">Folder ảnh sản phẩm</td>
                 <td>
                    <asp:TextBox CssClass="AdminTextbox" ID="txtProductAbstract" runat="server"></asp:TextBox>
                    <asp:Button ID="Button1" OnClientClick="openRadWindow('FileManager.aspx?control=txtProductAbstract','ExplorerWindow'); return false;" Text="Open... " runat="server" />
                </td>
                <td></td>
            </tr>
            
            <tr>
                   <td style="width:250px">Chi Tiết Sản Phẩm</td>
                    <td>
                        <telerik:RadEditor ID="txtProductContent" runat="server">
                            <ImageManager UploadPaths="/Upload/" ViewPaths="/Upload/" DeletePaths="/Upload/" />
                            <DocumentManager UploadPaths="/Upload/" ViewPaths="/Upload/" DeletePaths="/Upload/" />
                            <FlashManager UploadPaths="/Upload/" ViewPaths="/Upload/" DeletePaths="/Upload/" />
                            <MediaManager UploadPaths="/Upload/" ViewPaths="/Upload/" DeletePaths="/Upload/" />
                        </telerik:RadEditor>
                    </td>
                    <td></td>
            </tr>
            
            <tr>
                <td style="width:250px">Ảnh Sản Phẩm</td>
                <td>
                    <asp:TextBox CssClass="AdminTextbox" ID="txtProductImage" runat="server"></asp:TextBox>
                    <asp:Button ID="selectFile" OnClientClick="openRadWindow('FileManager.aspx?control=txtProductImage','ExplorerWindow'); return false;" Text="Open... " runat="server" />
                </td>
                <td></td>
            </tr>
            
            <tr>
                <td style="width:250px">
                    Giá
                </td>
                <td>
                    <telerik:RadNumericTextBox ID="txtProductPrice" Value="0" runat="server"></telerik:RadNumericTextBox>
                </td>
                <td>
                </td>
            </tr>
            
            <tr>
                <td style="width:250px">
                    Giá khuyến mại
                </td>
                <td>
                    <telerik:RadNumericTextBox ID="txtDiscountPrice" Value="0" runat="server"></telerik:RadNumericTextBox>
                </td>
                <td>
                </td>
            </tr>
            
            <tr>
                <td style="width:250px">
                    Loại hàng: 
                </td>
                <td>
                    <asp:DropDownList runat="server" ID="cboType">
                        <asp:ListItem Text="Hàng mới" Value="0"></asp:ListItem>
                        <asp:ListItem Text="Hàng cũ" Value="1"></asp:ListItem>
                   </asp:DropDownList>
                </td>
                <td>
                </td>
            </tr>
            
            <tr>
                <td style="width:250px">
                    Trạng thái
                </td>
                <td>
                    <asp:DropDownList runat="server" ID="cboStatus">
                        <asp:ListItem Text="Hết Hàng" Value="0"></asp:ListItem>
                        <asp:ListItem Text="Sẵn Hàng" Value="1"></asp:ListItem>
                        <asp:ListItem Text="Hàng đang về" Value="2"></asp:ListItem>
                        <asp:ListItem Text="Hàng đặt" Value="3"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                </td>
            </tr>
            
            <tr>
                <td style="width:250px">
                    Meta Keyword
                </td>
                <td>
                    <asp:TextBox CssClass="AdminTextbox" ID="txtMetaKeyword" runat="server"></asp:TextBox>
                </td>
                <td>
                </td>
            </tr>
            
            <tr>
                <td style="width:250px">
                    Meta Description
                </td>
                <td>
                    <asp:TextBox CssClass="AdminTextbox" ID="txtMetaDescription" runat="server"></asp:TextBox>
                </td>
                <td>
                </td>
            </tr>
            
            <tr>
               <td style="width:250px">
                    Thứ Tự Hiển Thị
                </td>
                <td>
                    <telerik:RadNumericTextBox ID="txtViewOrder" runat="server">
                    </telerik:RadNumericTextBox>
                </td>
                <td>
                <asp:RequiredFieldValidator ControlToValidate="txtViewOrder" ID="RequiredFieldValidator2" runat="server" ErrorMessage="Bạn Phải Nhập Thứ Tự Hiển Thị"></asp:RequiredFieldValidator>
                </td>
            </tr>
            
             <tr>
                <td colspan="3">
                    <asp:CheckBox Text="Sản Phẩm Mới" ID="chkIsNew" runat="server" /> &nbsp;&nbsp;
                    <asp:CheckBox Text="Sản Phẩm Hot" ID="chkIsHot" runat="server" /> &nbsp;&nbsp;
                    <asp:CheckBox Text="Sản Phẩm Nổi Bật" ID="chkIsTypical" runat="server" /> &nbsp;&nbsp;
                </td>
            </tr>
        
            <tr>
                <td colspan="3" align="center">
                    <asp:Button CssClass="AdminSaveButton" runat="server" ID="btnCreate" OnClick="btnCreate_Click" Text="Thêm Mới" />
                    <asp:Button CssClass="AdminCancelButton" runat="server" ID="btnReset" CausesValidation="false" OnClick="btnReset_Click" Text="Quay Lại" />            
                </td>
            </tr>
        </table>
  </fieldset>      
 </asp:Content>
